//
//  TitleNewsCell.m
//  JJHW_coreData
//
//  Created by huazi on 16/4/20.
//  Copyright © 2016年 HFKJ_LZQ. All rights reserved.
//

#import "TitleNewsCell.h"

@implementation TitleNewsCell

- (void)awakeFromNib {
    // Initialization code
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self =[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initSubviews];
    }
    return self;
}
- (void)initSubviews {
    self.labelTitle =[[UILabel alloc] initWithFrame:CGRectMake(15, 10, DeviceWidth-30, 30)];
    self.labelTitle.numberOfLines =0;
    self.labelTitle.font =themeFont22;
    self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, self.labelTitle.frame.size.height+10+15, DeviceWidth-30, 20)];
    self.timeLabel.font = themeFont12;
    self.timeLabel.textColor = KzxDetailDefaultTimeColor;
    self.xianImageview = [[UIImageView alloc] initWithFrame:CGRectMake(15, self.timeLabel.frame.origin.y+self.timeLabel.frame.size.height, DeviceWidth-30, 0.5)];
//     self.xianImageview.backgroundColor = [UIColor colorWithHexString:@"F0F0F0"];
    self.xianImageview.image = [UIImage imageNamed:@"labelxian"];
    [self.contentView addSubview:self.labelTitle];
    [self.contentView addSubview:self.timeLabel];
    [self.contentView addSubview:self.xianImageview];
}
- (void)reloadDataCell:(id)model andPublishTime:(NSString *)time AndHeignt:(float)height{
    self.labelTitle.frame =CGRectMake(15, 10, DeviceWidth-30, height-15-20-20);
    self.labelTitle.text =model;
    
    self.timeLabel.text = time;
    self.timeLabel.frame = CGRectMake(15, self.labelTitle.frame.size.height+10+10, DeviceWidth-30, 18);
    
    self.xianImageview.frame = CGRectMake(15, self.timeLabel.frame.origin.y+self.timeLabel.frame.size.height+10, DeviceWidth-30, 0.5);
    self.xianImageview.backgroundColor = [UIColor colorWithHexString:@"F0F0F0"];
//    self.xianImageview.image = [UIImage imageNamed:@"labelxian"];
    
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
